<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 

<h:head>
	<h:outputStylesheet library="css" name="index.css"/>
	<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'/>
	<title>TravelDream</title>
</h:head> 

<h:body> 
<h:outputStylesheet library="css" name="primefaces-style.css"/>
<div id="header">
		<div id="logo">
			<h:link outcome="index" >
				<h:outputText value="TravelDream" style="position: absolute;
left: 5px;
top: inherit;
width: 100px;
height: 95%;
font-family: 'Roboto', sans-serif;
color: #111;
font-size: 35px;" />
			</h:link>
			
		</div>
	</div>	
	<div id="line">
	</div>
<div id="registration">
	
			<h:form id="registrationForm">
			<p:panel header="Registration" styleClass="redColoredPanel">
	       		<h:panelGrid columns="3" cellpadding="5">
	       			
	       			<h:outputText value="UserName" />
					<p:inputText id="email" value="#{user.current.email}"/>
					<h:outputText value="#{user.errorEmail}" />
													
					<p:outputLabel for="firstName" value="First Name" />
						<p:inputText id="firstName" value="#{user.current.firstName}">
						
					</p:inputText>
					<p:message for="firstName"/>
					
					
					<p:outputLabel for="lastName" value="Last Name" />
						<p:inputText id="lastName" value="#{user.current.lastName}" >
						
					</p:inputText>
					<p:message for="lastName"/>
					
					
					<p:outputLabel for="password" value="Password"/>
					<p:password id="password" value="#{user.current.password}"
						feedback="true" match="pwd2" label="Password"/>
					<p:message for="password" />

					<p:outputLabel for="pwd2" value="Repeat Password"/>
					<p:password id="pwd2" label="Confirm Password" value="#{user.current.password}"/>						
					<p:message for="password"/>
				
					<p:commandButton value="add" action="#{user.create()}" update="registrationForm" /> 
		       		</h:panelGrid>
		       		<h:panelGrid columns="1" cellpadding="3">
		       			
		       			<h:outputText value="#{user.feedBackCreation}"/>
		       		</h:panelGrid>
		       		
		       		
			</p:panel>	
			
			 
			
			<p:panel header="Login">
				<h:panelGrid columns="2" cellspacing="10">
					<h:link outcome="users/homePage" value="User" />  
					<h:link outcome="admins/homePage" value="Admin" />
				</h:panelGrid>			 
			</p:panel> 
		</h:form>  
</div>	


	<div id="logLink">
		
	</div>
		 
		
		
	
</h:body> 
</html>
